package demo4;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:张熳
 * Date:2025-08-28
 * Time:21:18
 */
//实现多个接口

public class Dog extends Animal implements IRunning,ISwimming{

    public Dog(String name, int age) {
        super(name, age);
    }

    @Override
    public void eat() {
        System.out.println(this.name + "🐶正在吃骨头");
    }

    @Override
    public void run() {
        System.out.println(this.name + "🐶正在地面奔跑~");
    }

    @Override
    public void swim() {
        System.out.println(this.name + "🐶正在水里游泳~");
    }
}
